import request from '@/utils/request'

// 分页查询库区
export const KuQuList = (params) => {
  return request({
    url: 'api/area/pageDetail',
    params
  })
}

// 新增库区
export const AddKuQuList = (data) => {
  return request({
    url: 'api/area',
    method: 'POST',
    data
  })
}
// 编辑库区
export const BianjiKuQu = (id) => {
  return request({
    url: `api/area/${id}`
  })
}
export const BianjiKuQuList = (data) => {
  return request({
    url: 'api/area',
    method: 'PUT',
    data
  })
}
// 删除库区
export const ShanChuKuQu = (id) => {
  return request({
    url: `api/area?ids[]=${id}`,
    method: 'DELETE'
  })
}
